<template>
  <echarts-view :options="option" theme="walden"></echarts-view>
</template>

<script>
import echartsView from '@/components/ECharts'
const barData = []
const lineData = []
for (let i = 0; i < 12; i += 1) {
  barData.push(`${i + 1}月`)
  lineData.push(Math.floor(Math.random() * 10000) + 200)
}

export default {
  components: {
    echartsView
  },
  data () {
    return {
      option: {
        tooltip: {
          trigger: 'axis',
          axisPointer: {
            type: 'shadow'
          }
        },
        xAxis: {
          data: barData,
          splitLine: {
            show: false
          },
          axisLabel: {
            color: '#333'
          }
        },
        yAxis: {
          type: 'value',
          splitLine: {
            lineStyle: {
              color: '#eee',
              type: 'dashed'
            }
          },
          axisLine: {
            show: false
          },
          axisLabel: {
            color: '#333'
          }
        },
        series: [
          {
            data: lineData,
            type: 'bar'
          }
        ]
      }
    }
  }
}
</script>

<style>

</style>
